#include <iostream>
#include <cstring>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "myh/MyLog.hpp"
#include "tcpclient.hpp"

void Explain()
{
    std::cout << "./client [ip] [port]" << std::endl;
}
void test2(uint16_t port,const std::string& ip)
{
    tcpclient::Getinitance(port, ip);

    tcpclient::Getinitance()->run();
}

int main(int num, char *args[])
{
    lg.ChangeFilePath(Screnn);
    if (num != 3)
    {
        Explain();
        exit(0);
    }
    uint16_t port = std::stol(args[2]);
    std::string ip = args[1];

    // std::cout << port  << std::endl;
    // std::cout << ip << std::endl;
    // //test1(port,ip);
    test2(port,ip);

    return 0;
}